package com.yuyou.fn.educational.service.impl;

import com.github.wens.framework.service.impl.SuperServiceImpl;
import com.github.wens.mybatisplus.examples.Example;
import com.yuyou.fn.educational.entity.ExamQuestion;
import com.yuyou.fn.educational.mapper.ExamQuestionMapper;
import com.yuyou.fn.educational.service.IExamQuestionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * ExamQuestion 表数据服务层接口实现类
 *
 */
@Service
public class ExamQuestionServiceImpl extends SuperServiceImpl<ExamQuestionMapper, ExamQuestion,Long> implements IExamQuestionService {


    @Override
    public List<ExamQuestion> findExamQuestionByExamPaperId(Long examPaperId) {
        Example<ExamQuestion> example = ExamQuestion.createExample();
        example.createCriteria().andEqualTo("examPaperId" ,examPaperId );
        example.orderBy("questionNo").asc();
        return findListByExample(example);
    }
}